<!--
 * @Author: your name
 * @Date: 2021-08-10 14:37:18
 * @LastEditTime: 2021-08-10 16:21:06
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\3-html&css\day07\08-图片精灵.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图片精灵</title>
    <style>
        div{
            width:150px;
            height:700px;
            background-image: url('./sprites.jpg');
        }
       div>div:nth-child(1){
           width:150px;
           height:150px;
             background-position: -110px -125px;  
                 
       }
       div>div:nth-child(2){
        width:150px;
           height:150px;
             background-position: -110px -300px;  
       }
       div>div:nth-child(3){
        width:150px;
           height:150px;
             background-position: -110px -475px;
       }
       div>div:nth-child(4){
        width:150px;
           height:150px;
             background-position: -110px -650px;
       }
    </style>
</head>
<body>
   <div>
       <div>梅花</div>
       <div>王冠</div>
       <div>脚印</div>
       <div>蝴蝶结</div>
   </div>
</body>
</html>